Translate XML elements
The translate elements are used during the OnSubmit phase to create a translated PDF version of the letter and append it to the letter. The elements are currently implemented by the standard XML attachment processor.
Schema
<mkzAttachment type="standard">
<onSubmit>
<translateLanguage [scan|identifier] >language-code</translateLanguage>
<appendTranslatedPdf outputFolderTranslate="folder"
includeAttachment="true|false"
onlyBody="true|false"
startBody="start-text"
endBody="end-text" />
</onSubmit>
</mkzAttachment>
The XML can be executed during the OnSubmit phase.
The XML supports the following elements during OnSubmit.
<translateLanguage>
Sets the target language used by subsequent <appendTranslatedPdf> elements. The value can be literal text, scanned from the letter, or read from an identifier.
This element should appear before <appendTranslatedPdf>.
<appendTranslatedPdf>
Creates a translated PDF from the current letter using the language specified by <translateLanguage>. The translated PDF is saved to the output folder and appended to the letter PDF.
<appendTranslatedPdf outputFolderTranslate="folder" />
Specifies the folder where the translated PDF should be saved. If this attribute is empty, HybridMail uses the folder of the translated PDF produced by the translator.
<appendTranslatedPdf includeAttachment="true" />
If true, the first existing PDF attachment on the letter is also translated or reused if a translated copy already exists. The translated letter and translated attachment are concatenated before being appended.
If true and no valid attachment file is available, processing fails.
<appendTranslatedPdf onlyBody="true" />
If true, only the body text identified by the body boundaries is translated.
<appendTranslatedPdf startBody="start-text" endBody="end-text" />
Specifies text markers used by the translator to identify the body content.
Examples
Translate the letter into Welsh and append the translated version to the original letter.
<mkzAttachment type="standard">
<onSubmit>
<translateLanguage>cy</translateLanguage>
<appendTranslatedPdf outputFolderTranslate="C:\HybridMail\Translated"
includeAttachment="false"
onlyBody="true"
startBody="Dear"
endBody="Yours sincerely" />
</onSubmit>
</mkzAttachment>
Read the target language from the letter, translate the first attachment as well, and append the combined translated PDF.
<mkzAttachment type="standard">
<onSubmit>
<translateLanguage scan="20,30,50,10" />
<appendTranslatedPdf outputFolderTranslate="C:\HybridMail\Translated"
includeAttachment="true"
onlyBody="false" />
</onSubmit>
</mkzAttachment>